package com.mine.java.future;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author weixiao
 * @date 2025/3/24 10:25
 */
public class PrintUtils {

    public static void sleep(long mills) {
        try {
            Thread.sleep(mills);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void print(String str) {
        Thread thread = Thread.currentThread();
        System.out.println(LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
                + " | " +thread.getName()
                + " | " + str);
    }
}
